package com.cnki.caselib.business;

import java.util.List;

import com.cnki.caselib.domain.LoginSession;
import com.cnki.caselib.domain.User;
import com.cnki.caselib.exception.LoginFailedException;
import com.cnki.caselib.exception.UserNotFoundException;

public interface UserManager {
	public LoginSession login(String username, String password,int  type)
			throws LoginFailedException;

	public boolean changePasswd(User user, String oldpassword,
			String newpassword) throws LoginFailedException;

	public User getUserByUsername(String username) throws UserNotFoundException;

	public boolean addUser(User user);
	
	public List<User> getAllUsers();
}
